import Vue from 'vue'

// import Cookies from 'js-cookie'

import Storage from 'vue-ls'

import 'normalize.css/normalize.css'

// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss'

// moment.js 时间插件
// import moment from 'moment'
// eslint-disable-next-line no-undef
moment.locale('zh-cn')
// eslint-disable-next-line no-undef
Vue.prototype.$moment = moment

// 规则
import { rules } from '@/utils/rules'
Vue.prototype.rules = rules

import App from './App'
import store from './store'
import router from './router'

import i18n from './lang'
import './icons'
import './permission'

import * as filters from './filters'

// Vue.use(ElementUI, {
//   size: Cookies.get('size') || 'medium'
// })

Vue.use(Storage, {
  name: 'ls',
  storage: 'local'
})

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

// // 全局数据词典组件
// import DictSelectTag from '@/components/xm/dict/index.js'
// Vue.use(DictSelectTag)

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
